import request from "@/libs/request";

const basePath = '/appcloud-portal' ;

export const apiUrls = {
  deleteDeptById : basePath + '/dept/deleteDeptById/',
  getDeptInfoByUserID : basePath + '/dept/getDeptInfoByUserID/',
  getTree : basePath + '/dept/getTree',
  saveDept : basePath + '/dept/saveDept',
  getDeptInfoByUserID : basePath + '/dept/getDeptInfoByUserID/',
  updateDept : basePath + '/dept/updateDept'
}
//根据部门编号删除部门
export async function deleteDeptById(id){
	return request( apiUrls.deleteDeptById + id, {
      method:'POST',
  })
}
//通过用户 ID 获取 部门信息
export async function getDeptInfoByUserID(id){
	return request( apiUrls.getDeptInfoByUserID + id, {
      method:'POST',
  })
}

//获取部门列表树
export async function getTree(params){
	return request( apiUrls.getTree, {
      method:'POST',
      body:params
  })
}

//保存部门
export async function saveDept(params){
	return request( apiUrls.saveDept, {
      method:'POST',
      body:params
  })
}


//修改部门
export async function updateDept(params){
	return request( apiUrls.updateDept, {
      method:'POST',
      body:params
  })
}